package com.mioto.ld.module.product.service.impl;

import com.mioto.ld.module.product.model.ProductTypePagerVO;
import org.springframework.stereotype.Service;

import com.mioto.ld.module.product.dao.ProductTypeDao;
import com.mioto.ld.module.product.model.ProductType;
import com.mioto.ld.module.product.service.IProductTypeService;
import javax.annotation.Resource;
import java.util.List;

/**
 *
 * @author mioto
 * @date 2024-05-14 21:05:42
 */
@Service("productTypeService")
public class ProductTypeServiceImpl implements IProductTypeService{

    @Resource
    private ProductTypeDao productTypeDao;

    @Override
    public List<ProductType> findList(ProductType productType) {
        return productTypeDao.findList(productType);
    }

    @Override
    public int insert(ProductType productType) {
        productType.initCreateData();
        return productTypeDao.insertIgnoreNull(productType);
    }

    @Override
    public int update(ProductType productType) {
        return productTypeDao.update(productType);
    }

    @Override
    public int updateIgnoreNull(ProductType productType) {
        return productTypeDao.updateIgnoreNull(productType);
    }

    @Override
    public ProductType findByColumn(String column, Object value) {
        return productTypeDao.findByColumn(column,value);
    }

    @Override
    public int deleteByColumn(String column, Object value) {
        return productTypeDao.deleteByColumn(column,value);
    }

    @Override
    public int batchDelete(Integer[] ids) {
        return productTypeDao.batchDelete(ids);
    }

    @Override
    public List<ProductTypePagerVO> findPager(ProductType productType) {
        return productTypeDao.findPager(productType);
    }
}